<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <head>
	 <base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title>校园招聘</title>
		<link rel="stylesheet" href="css/bootstrap.min.css">
		<link href="css/content.css" rel="stylesheet">
		<link  href="css/footer.css" rel="stylesheet">
		<script type="text/javascript" src="js/jquery-3.4.1.js"></script>
		<script type="text/javascript" src="js/bootstrap.min.js"></script>
	</head>
  
  <body>
  <!-- 导入导航栏 -->
		<jsp:include page="/common/header.jsp"></jsp:include>
			<!-- 分割 -->
		<div style="height: 20px;"></div>
   <div class="container"  style="height:400px;">
	<div class="row">
			<table class="table table-hover">
				<thead>
					<tr>
						<th>
							求职人ID
						</th>
						<th>
							意向岗位
						</th>
						<th>
							简要介绍
						</th>
						<th>
							意向薪资
						</th>
						<th>
							发布日期
						</th>
						<!--  
						<c:if test="${user!=null }" var="flag" scope="session">
						<c:if test="${user.status==1 }" var="flag" scope="session">
						<th>
							感兴趣
						</th>
						</c:if>
						</c:if>
						-->
					</tr>
				</thead>
				<c:forEach items="${ infos}"  var="info">
					<tr>
						<td>
							<a href="show/showperson?id=${ info.pId}">${ info.pId}</a>
						</td>
						<td>
							${info.name }
						</td>
						
						<td>
							${ info.tips}
						</td>
						<td>
							${ info.salary}
						</td>
						<td>
								<fmt:formatDate pattern="yyyy-MM-dd" value="${ info.pubtime}" />
						</td>
					<!--	<c:if test="${user!=null }" var="flag" scope="session">
						<c:if test="${user.status==1 }" var="flag" scope="session">
						<td>
							<input type="button" value="感兴趣" onclick="reun()">
						</td>
						</c:if>
						</c:if>
					 -->
					</tr>
				</c:forEach>
				
			</table>
		  <a href="show/showinfo?pageNO=${pageNO-1 }" <c:if test="${pageNO<=1 }">  onclick="javascript:return false;" </c:if> >上一页</a>
		<c:forEach var="i" begin="1" end="${count%size==0?count/size:count/size+1}">
		<input class="btn btn-default btn-sm" type="button" onclick="return tiaozhuan('${i}')" value="${i}"> 
		<!--<span class="current"> </span> -->
		<!-- <a href="showuser.do?pageNumber=${i}&pageSize=${PageInfo.pageSize}"><c:out value="${i}"/></a> -->
		</c:forEach>
		<a href="show/showinfo?pageNO=${pageNO+1 }" <c:if test="${pageNO>=count/size }">  onclick="javascript:return false;" </c:if> >下一页</a>
		<script type="text/javascript">
			function tiaozhuan(i) {
				location.href = "show/showinfo?pageNO"+i+"&pageSize=${size}";
			}
		
		
		</script>			
	</div>
</div>
  <!--分页 -->
        <link href="css/pagination.css" type="text/css" rel="stylesheet" />
        <script type="text/javascript" src="js/jquery.pagination.js"/></script>
        <script type="text/javascript">
           //初始化分页组件
           var count=${count};
           var size=${size};
           var pageNO=${pageNO};
           var a;
           $("#pager").pagination(count, {
              items_per_page:size,
               current_page:pageNO-1,
               next_text:"下一页",
               prev_text:"上一页",
               num_edge_entries:2,
               load_first_page:false,
               callback:handlePaginationClick
            });
           
           //回调方法
           function handlePaginationClick(new_page_index, pagination_container){
         	  window.location.href = "http://www.baidu.com";
      	 	location.href="show/showinfo?pageNO="+(new_page_index+1);
      	 
           }
           
           
           
           function reun(a){
          window.location.href = "http://www.baidu.com";
        
           }
        </script>
	

<!-- 导入底部信息 -->
  	<jsp:include page="/common/footer.jsp"></jsp:include>

  </body>
</html>
